package com;


import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.HashMap;

/**
 * 测试类
 * @author LinJie
 *
 */
public class CycleTest {
    @Test
    public void test() {
        ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
        Student student = (Student) context.getBean("student");
        //Bean的使用
        student.play();
        System.out.println(student);
        //关闭容器
        ((AbstractApplicationContext) context).close();
        HashMap<Object, Object> objectObjectHashMap = new HashMap<>(9);
        for (int i = 0; i <14 ; i++) {
            objectObjectHashMap.put(i,i);
        }
        System.out.println(1);
    }
}
